<?xml version="1.0" encoding="utf-8"?>
<Tables>
  <DBVersion Table="db_version" Column="version" MinVersion="1" MaxVersion="1" />

  <Table Name="areatrigger_involvedrelation" MainDataHolder="ATTemplate">
    <PrimaryColumn Name="id" TypeName="UInt32"/>
  </Table>

  <Table Name="areatrigger_tavern" MainDataHolder="ATTemplate">
    <PrimaryColumn Name="id" TypeName="UInt32"/>
    <Var Name="Type" Value="Rest"/>
  </Table>

  <Table Name="areatrigger_teleport" MainDataHolder="ATTemplate">
    <PrimaryColumn Name="id" TypeName="UInt32"/>
  </Table>

  <Table Name="battleground_template">
    <PrimaryColumn Name="id"/>
  </Table>

  <Table Name="battlemaster_entry">
    <PrimaryColumn Name="entry"/>
  </Table>

  <Table Name="creature" MainDataHolder="SpawnEntry">
    <PrimaryColumn Name="guid"/>
  </Table>

  <Table Name="creature_addon" MainDataHolder="SpawnEntry">
    <PrimaryColumn Name="guid" TypeName="UInt32"/>
  </Table>

  <Table Name="creature_equip_template" MainDataHolder="NPCEntry">
    <PrimaryColumn Name="entry" TypeName="UInt32"/>
  </Table>

  <Table Name="creature_involvedrelation">
    <PrimaryColumn Name="id"/>
    <PrimaryColumn Name="quest"/>
    <Var Name="RelationType" Value="Finisher"/>
  </Table>

  <Table Name="creature_loot_template">
    <PrimaryColumn Name="entry"/>
    <PrimaryColumn Name="item"/>
    <Var Name="LootType" Value="NPCCorpse"/>
  </Table>

  <Table Name="creature_model_info">
    <PrimaryColumn Name="modelid"/>
  </Table>

  <Table Name="creature_movement">
    <PrimaryColumn Name="id"/>
    <PrimaryColumn Name="point"/>
  </Table>

  <Table Name="creature_onkill_reputation">
    <PrimaryColumn Name="creature_id"/>
  </Table>

  <Table Name="creature_questrelation">
    <PrimaryColumn Name="id"/>
    <PrimaryColumn Name="quest"/>
    <Var Name="RelationType" Value="Starter"/>
  </Table>
  <!--
  <Table Name="creature_respawn">
    <PrimaryColumn Name="guid"/>
    <PrimaryColumn Name="instance"/>
  </Table>
-->
  <Table Name="creature_template" MainDataHolder="NPCEntry">
    <PrimaryColumn Name="entry"/>
  </Table>

  <Table Name="creature_template_addon">
    <PrimaryColumn Name="entry"/>
  </Table>

  <Table Name="disenchant_loot_template">
    <PrimaryColumn Name="entry"/>
    <PrimaryColumn Name="item"/>
    <Var Name="LootType" Value="Disenchanting"/>
  </Table>

  <Table Name="exploration_basexp">
    <PrimaryColumn Name="level"/>
  </Table>

  <Table Name="fishing_loot_template">
    <PrimaryColumn Name="entry"/>
    <PrimaryColumn Name="item"/>
    <Var Name="LootType" Value="Fishing"/>
  </Table>

  <Table Name="gameobject">
    <PrimaryColumn Name="guid"/>
  </Table>

  <Table Name="gameobject_involvedrelation">
    <PrimaryColumn Name="id"/>
    <PrimaryColumn Name="quest"/>
    <Var Name="RelationType" Value="Finisher"/>
  </Table>

  <Table Name="gameobject_loot_template">
    <PrimaryColumn Name="entry"/>
    <PrimaryColumn Name="item"/>
    <Var Name="LootType" Value="GameObject"/>
  </Table>

  <Table Name="gameobject_questrelation">
    <PrimaryColumn Name="id"/>
    <PrimaryColumn Name="quest"/>
    <Var Name="RelationType" Value="Starter"/>
  </Table>
  
  <Table Name="gameobject_template">
    <PrimaryColumn Name="entry"/>
  </Table>

  <Table Name="game_event">
    <PrimaryColumn Name="entry"/>
  </Table>

  <Table Name="game_event_creature" MainDataHolder="SpawnEntry">
    <PrimaryColumn Name="guid" TypeName="UInt32"/>
  </Table>

  <Table Name="game_event_creature_quest">
    <PrimaryColumn Name="id"/>
    <PrimaryColumn Name="quest"/>
  </Table>

  <Table Name="game_event_gameobject" MainDataHolder="GOTemplate">
    <PrimaryColumn Name="guid" TypeName="UInt32"/>
  </Table>

  <Table Name="game_event_model_equip">
    <PrimaryColumn Name="guid"/>
  </Table>

  <Table Name="game_event_pool">
    <PrimaryColumn Name="pool_entry"/>
  </Table>

  <Table Name="game_graveyard_zone">
    <PrimaryColumn Name="id" />
    <PrimaryColumn Name="ghost_zone" />
  </Table>

  <Table Name="game_tele">
    <PrimaryColumn Name="id" />
  </Table>

  <Table Name="game_weather">
    <PrimaryColumn Name="zone" />
  </Table>


  <Table Name="instance_template">
    <PrimaryColumn Name="map" />
  </Table>

  <Table Name="item_enchantment_template">
    <PrimaryColumn Name="entry" />
    <PrimaryColumn Name="ench" />
  </Table>

  <Table Name="item_loot_template">
    <PrimaryColumn Name="entry" />
    <PrimaryColumn Name="item" />
    <Var Name="LootType" Value="Item"/>
  </Table>

  <Table Name="item_template">
    <PrimaryColumn Name="entry" TypeName="UInt32"/>
  </Table>

  <Table Name="item_required_target"  MainDataHolder="ItemTemplate">
    <PrimaryColumn Name="entry" TypeName="UInt32"/>
  </Table>

  <Table Name="locales_achievement_reward">
    <PrimaryColumn Name="entry" />
  </Table>
  <Table Name="locales_creature" MainDataHolder="NPCEntry">
    <PrimaryColumn Name="entry" TypeName="UInt32"/>
  </Table>
  <Table Name="locales_gameobject" MainDataHolder="GOEntry">
    <PrimaryColumn Name="entry" TypeName="UInt32"/>
  </Table>

  <Table Name="locales_item" MainDataHolder="ItemTemplate">
    <PrimaryColumn Name="entry" TypeName="UInt32"/>
  </Table>

  <Table Name="locales_npc_option">
    <PrimaryColumn Name="entry" />
  </Table>

  <Table Name="locales_npc_text" MainDataHolder="NPCEntry">
    <PrimaryColumn Name="entry" />
  </Table>

  <Table Name="locales_page_text" MainDataHolder="PageTextEntry">
    <PrimaryColumn Name="entry" TypeName="UInt32" />
  </Table>

  <Table Name="locales_points_of_interest">
    <PrimaryColumn Name="entry" />
  </Table>

  <Table Name="locales_quest" MainDataHolder="QuestTemplate">
    <PrimaryColumn Name="entry" TypeName="UInt32"/>
  </Table>

  <Table Name="milling_loot_template">
    <PrimaryColumn Name="entry" />
    <PrimaryColumn Name="item" />
    <Var Name="LootType" Value="Milling"/>
  </Table>

  <Table Name="npc_gossip" >
    <PrimaryColumn Name="npc_guid" />
  </Table>

  <Table Name="npc_gossip_textid" >
    <PrimaryColumn Name="zoneid" />
  </Table>

  <Table Name="npc_option">
    <PrimaryColumn Name="id" />
  </Table>
  
  <Table Name="npc_text">
    <PrimaryColumn Name="ID" />
  </Table>

  <Table Name="npc_trainer" MainDataHolder="TrainerSpellEntry">
    <PrimaryColumn Name="entry" />
    <PrimaryColumn Name="spell"/>
  </Table>

  <Table Name="npc_vendor">
    <PrimaryColumn Name="entry" />
    <PrimaryColumn Name="item" />
  </Table>

  <Table Name="page_text">
    <PrimaryColumn Name="entry" />
  </Table>

  <Table Name="petcreateinfo_spell">
    <PrimaryColumn Name="entry" />
  </Table>
  <Table Name="pet_levelstats">
    <PrimaryColumn Name="creature_entry" />
    <PrimaryColumn Name="level" />
  </Table>

  <Table Name="pet_name_generation">
    <PrimaryColumn Name="id" />
  </Table>

  <Table Name="pickpocketing_loot_template">
    <PrimaryColumn Name="entry" />
    <PrimaryColumn Name="item" />
    <Var Name="LootType" Value="Pickpocketing"/>
  </Table>

  <Table Name="playercreateinfo">
    <PrimaryColumn Name="race" />
    <PrimaryColumn Name="class" />
  </Table>

  <Table Name="playercreateinfo_action">
    <PrimaryColumn Name="race" />
    <PrimaryColumn Name="class" />
  </Table>

  <Table Name="playercreateinfo_item">
    <PrimaryColumn Name="race" />
    <PrimaryColumn Name="class" />
  </Table>


  <Table Name="playercreateinfo_spell">
    <PrimaryColumn Name="race" />
    <PrimaryColumn Name="class" />
  </Table>

  <Table Name="player_classlevelstats">
    <PrimaryColumn Name="class" />
    <PrimaryColumn Name="level" />
  </Table>


  <Table Name="player_levelstats">
    <PrimaryColumn Name="race" />
    <PrimaryColumn Name="class" />
    <PrimaryColumn Name="level" />
  </Table>

  <Table Name="player_xp_for_level">
    <PrimaryColumn Name="lvl" />
  </Table>
  <Table Name="points_of_interest">
    <PrimaryColumn Name="entry" />
  </Table>
  <Table Name="pool_gameobject">
    <PrimaryColumn Name="guid" />
    <PrimaryColumn Name="pool_entry" />
  </Table>
  <Table Name="pool_pool">
    <PrimaryColumn Name="pool_id" />
    <PrimaryColumn Name="mother_pool" />
  </Table>
  <Table Name="pool_template">
    <PrimaryColumn Name="entry" />
  </Table>
  <Table Name="prospecting_loot_template">
    <PrimaryColumn Name="entry" />
    <PrimaryColumn Name="item" />
    <Var Name="LootType" Value="Prospecting"/>
  </Table>
  <Table Name="quest_mail_loot_template">
    <PrimaryColumn Name="entry" />
    <PrimaryColumn Name="item" />
  </Table>
  <Table Name="quest_template">
    <PrimaryColumn Name="entry" />
  </Table>
  <Table Name="reference_loot_template">
    <PrimaryColumn Name="entry" />
    <PrimaryColumn Name="item" />
  </Table>
  <Table Name="reserved_name">
    <PrimaryColumn Name="name" />
  </Table>
  
  <Table Name="skill_discovery_template">
    <PrimaryColumn Name="spellId" />
    <PrimaryColumn Name="reqSpell" />
  </Table>
  
  <Table Name="skill_extra_item_template">
    <PrimaryColumn Name="spellId" />
  </Table>
  
  <Table Name="skill_fishing_base_level">
    <PrimaryColumn Name="entry" />
  </Table>
  
  <Table Name="skill_initial_ability">
    <PrimaryColumn Name="entry"/>
    <PrimaryColumn Name="SpellID"/>
  </Table>
  
  <Table Name="skinning_loot_template">
    <PrimaryColumn Name="entry" />
    <PrimaryColumn Name="item" />
    <Var Name="LootType" Value="Skinning"/>
  </Table>
  <Table Name="spell_affect">
    <PrimaryColumn Name="entry" />
    <PrimaryColumn Name="effectId" />
  </Table>
  <Table Name="spell_area">
    <PrimaryColumn Name="spell" />
  </Table>
  
  <Table Name="spell_base">
    <PrimaryColumn Name="SpellId"/>
  </Table>
  <Table Name="spell_bonus_data">
    <PrimaryColumn Name="entry" />
  </Table>
  <Table Name="spell_chain">
    <PrimaryColumn Name="spell_id" />
  </Table>
  <Table Name="spell_elixir">
    <PrimaryColumn Name="entry" />
  </Table>
  <Table Name="spell_learn_spell">
    <PrimaryColumn Name="entry" />
    <PrimaryColumn Name="SpellID" />
  </Table>
  <Table Name="spell_loot_template">
    <PrimaryColumn Name="entry" />
    <PrimaryColumn Name="item" />
  </Table>
  <Table Name="spell_pet_auras">
    <PrimaryColumn Name="spell" />
    <PrimaryColumn Name="pet" />
  </Table>
  <Table Name="spell_proc_event">
    <PrimaryColumn Name="entry" />
  </Table>
  <Table Name="spell_scripts">
    <PrimaryColumn Name="id" />
  </Table>
  <Table Name="spell_script_target" MainDataHolder="Spell">
    <PrimaryColumn Name="entry" TypeName="UInt32" />
  </Table>
  <Table Name="spell_target_position" MainDataHolder="Spell">
    <PrimaryColumn Name="id" TypeName="UInt32"/>
  </Table>
  <Table Name="spell_threat">
    <PrimaryColumn Name="entry" />
  </Table>
  <Table Name="transports">
    <PrimaryColumn Name="entry" />
  </Table>
</Tables>
  <!-- NPCs 
  <Table Name="npc_trainer_defs">
    <PrimaryColumn Name="creature_entry"/>
  </Table>

  <Table Name="npc_trainer_spell_settings">
    <PrimaryColumn Name="SpellID"/>
  </Table>

  <Table Name="npc_trainer_spells">
    <PrimaryColumn Name="creature_entry"/>
    <PrimaryColumn Name="SpellId"/>
  </Table>

  <Table Name="npc_vendor">
    <PrimaryColumn Name="creature_entry"/>
    <PrimaryColumn Name="item_entry"/>
  </Table>

  <Table Name="npc_text">
    <PrimaryColumn Name="text_entry" />
  </Table>

  <Table Name="npc_gossip_textid">
    <PrimaryColumn Name="textid"/>
  </Table>
  
  <! Items 
  <Table Name="item_template">
    <PrimaryColumn Name="entry"/>
  </Table>
  
<!his is in template
  <Table Name="item_foodtype" PrimaryKey="item_entry" MainDataHolder="ItemTemplate">
    <PrimaryColumn Name="item_entry" TypeName="UInt32"/>
  </Table>
>
<! completely missing in UDB 
  <Table Name="item_amounts" PrimaryKey="item_entry" MainDataHolder="ItemTemplate">
    <PrimaryColumn Name="item_entry" TypeName="UInt32"/>
  </Table> >


<! UDB SMASHED THESE TWO TOGETHER into item_enchantment_template and it's missing some of suffixes and format is probably different
  <Table Name="item_randomprop_groups">
    <PrimaryColumn Name="randomprops_group"/>
    <PrimaryColumn Name="randomprops_entryid"/>
  </Table>

  <Table Name="item_randomsuffix_groups">
    <PrimaryColumn Name="suffix_group"/>
    <PrimaryColumn Name="randomsuffix_entryid"/>
  </Table>
> 


  <!uests  SMASHED TOGETHER, but actually makes sense if they don't dump it straight from packet stream
  <Table Name="quests_root">
    <PrimaryColumn Name="QuestId"/>
  </Table>
  
  <Table Name="quests_objectives" MainDataHolder="QuestTemplate">
    <PrimaryColumn Name="QuestId" TypeName="UInt32"/>
  </Table>

  <Table Name="quests_requirements" MainDataHolder="QuestTemplate">
    <PrimaryColumn Name="QuestId" TypeName="UInt32"/>
  </Table>
  
  <Table Name="quests_rewards" MainDataHolder="QuestTemplate">
    <PrimaryColumn Name="QuestId" TypeName="UInt32"/>
  </Table>

  <Table Name="quests_settings" MainDataHolder="QuestTemplate">
    <PrimaryColumn Name="QuestId" TypeName="UInt32"/>
  </Table>

  <Table Name="quests_creature_starter">
    <PrimaryColumn Name="creature_entry"/>
    <PrimaryColumn Name="questId"/>
    
    <Var Name="RelationType" Value="Starter"/>
  </Table>

  <Table Name="quests_creature_finisher">
    <PrimaryColumn Name="creature_entry"/>
    <PrimaryColumn Name="questId"/>

    <Var Name="RelationType" Value="Finisher"/>
  </Table>

  <Table Name="quests_gameobject_starter">
    <PrimaryColumn Name="gameobject_entry"/>
    <PrimaryColumn Name="questId"/>
    
    <Var Name="RelationType" Value="Starter"/>
  </Table>

  <Table Name="quests_gameobject_finisher">
    <PrimaryColumn Name="gameobject_entry"/>
    <PrimaryColumn Name="questId"/>

    <Var Name="RelationType" Value="Finisher"/>
  </Table>











  <Table Name="loot_item">
    <PrimaryColumn Name="item_entry"/>
    <PrimaryColumn Name="drop_item_entry"/>

    <Var Name="LootType" Value="Item"/>
  </Table>

  <Table Name="loot_pickpocketing">
    <PrimaryColumn Name="creature_entry"/>
    <PrimaryColumn Name="drop_item_entry"/>

    <Var Name="LootType" Value="Pickpocketing"/>
  </Table>

  <Table Name="loot_prospecting">
    <PrimaryColumn Name="item_entry"/>
    <PrimaryColumn Name="drop_item_entry"/>

    <Var Name="LootType" Value="Prospecting"/>
  </Table>

  <Table Name="loot_milling">
    <PrimaryColumn Name="item_entry"/>
    <PrimaryColumn Name="drop_item_entry"/>

    <Var Name="LootType" Value="Milling"/>
  </Table>

  <Table Name="loot_skinning">
    <PrimaryColumn Name="creature_entry"/>
    <PrimaryColumn Name="drop_item_entry"/>

    <Var Name="LootType" Value="Skinning"/>
  </Table>
  
  
  <!Player Creation Info
  <Table Name="playercreateinfo_races">
    <PrimaryColumn Name="race"/>
  </Table>

  <Table Name="playercreateinfo_classes">
    <PrimaryColumn Name="class" TypeName="UInt32"/>
  </Table>

  <Table Name="playercreateinfo_archetype">
    <PrimaryColumn Name="race"/>
    <PrimaryColumn Name="class"/>
  </Table>

  <Table Name="playercreateinfo_spells">
    <PrimaryColumn Name="race"/>
    <PrimaryColumn Name="class"/>
  </Table>

  <Table Name="playercreateinfo_skills">
    <PrimaryColumn Name="race"/>
    <PrimaryColumn Name="class"/>
  </Table>

  <Table Name="playercreateinfo_items">
    <PrimaryColumn Name="race"/>
    <PrimaryColumn Name="class"/>
  </Table>

  <Table Name="playercreateinfo_bars">
    <PrimaryColumn Name="race"/>
    <PrimaryColumn Name="class"/>
  </Table>

  <Table Name="player_levelxp">
    <PrimaryColumn Name="level"/>
  </Table>
  




  <! World 
  <Table Name="world_mapinfo">
    <PrimaryColumn Name="MapID"/>
  </Table>

  <Table Name="world_cmdteleports">
    <PrimaryColumn Name="id"/>
  </Table>


  
  <! Spells 
  <Table Name="skills_initialability">
    <PrimaryColumn Name="BaseSkillId" />
    <PrimaryColumn Name="GainSpellId" />
  </Table>

  
  <Table Name="spell_base">
    <PrimaryColumn Name="SpellId" />
  </Table>

  <Table Name="spell_effects">
    <PrimaryColumn Name="SpellId" TypeName="UInt32"/>
    <PrimaryColumn Name="EffectIndex" TypeName="UInt32"/>
  </Table>

  <!Locales
  <Table Name="locales_gameobject" MainDataHolder="GOEntry">
    <PrimaryColumn Name="gameobject_entry" TypeName="UInt32"/>
  </Table>

  <Table Name="locales_item" MainDataHolder="ItemTemplate">
    <PrimaryColumn Name="item_entry" TypeName="UInt32"/>
  </Table>

  <Table Name="locales_creature" MainDataHolder="NPCEntry">
    <PrimaryColumn Name="creature_entry" TypeName="UInt32"/>
  </Table>

  <Table Name="locales_quest" MainDataHolder="QuestTemplate">
    <PrimaryColumn Name="questId" TypeName="UInt32"/>
  </Table>
  
  <!Transports
  <Table Name="world_transport">
    <PrimaryColumn Name="entry"/>
  </Table>
</Tables>
-->